<?php
class indexControl extends Control{
    function index(){
        header("Content-type:text/html;charset=utf-8");
        $db=M('pro');
        $row=$db->limit(3)->select();
        $this->assign('row',$row);
        $this->display();
    }
    function showNews(){
    	$db=M('news');
    	$count=$db->count();
    	$page=new page($count,8);
    	$row=$db->order('nid desc')->findall($page->limit());
    	$this->assign('row',$row);
    	$this->assign('page',$page->show(2));
    	$this->display();
    }
    function culture(){
    	$this->display();
    }
    function proc(){
        $db=M('pro');
        $row=$db->select();
        $count=$db->count();
        $page=new page($count,6);
        $row=$db->order('paddtime desc')->findall($page->limit());
        $this->assign('row',$row);
        $this->assign('page',$page->show(2));
    	$this->display();
    }
    function suppor(){
    	$this->display();
    }
    function showonenew(){
            $db=M('news');
            $nid=$_GET['nid'];
            $row=$db->find($nid);
            $this->assign('row',$row);
            $this->display();
        }
}